home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2007 December
/
PCWKCD1207B.iso
/
Windows marzen
/
Maxthon 2.0.4
/
mx_2.0.4.5799.exe
/
template
/
ConfigWizard
/
maxConfigWizard.js
< prev
Wrap
Text File
|
2007-09-20
|
2KB
|
84 lines
var maxConfigWizard={};
maxConfigWizard.activePage=0;
$langDefaultSection="ConfigWizard";
maxConfigWizard.init=function(){
document.title=$lang("title");
maxConfig.setActiveFile("$main",true);
maxConfigWizard.showPage(0);
};
maxConfigWizard.showPage=function(_1){
if(_1<0||_1>(maxConfigWizard.pages.length-1)){
return;
}
var _2=maxConfig.ui.buildItems(maxConfigWizard.pages[_1].items);
_2+="<br/><br/>";
var _3=$id("contentWrapper");
_3.innerHTML=_2;
var _4=$id("btnPrevious");
if(_1==0){
_4.style.color="#A89B80";
}else{
_4.style.color="";
}
var _5=$id("btnNext");
if(_1==(maxConfigWizard.pages.length-1)){
_5.style.color="#A89B80";
}else{
_5.style.color="";
}
var _5=$id("btnNext");
var _6=$id("btnFinish");
maxConfigWizard.activePage=_1;
try{
maxConfigWizard.pages[_1].init();
}
catch(e){
if(!((e.number&65535)==438)){
alert("maxConfigWizard.pages["+_1+"].init()\n"+(e.number&65535)+" : "+e.message);
throw (e);
}
}
};
maxConfigWizard.nextPage=function(){
maxConfigWizard.showPage(maxConfigWizard.activePage+1);
};
maxConfigWizard.previousPage=function(){
maxConfigWizard.showPage(maxConfigWizard.activePage-1);
};
maxConfigWizard.setSkin=function(_7){
if(_7){
external.max_invoke("ChangeStyle","custom");
}else{
external.max_invoke("ChangeStyle","system");
}
};
maxConfigWizard.setLayout=function(id){
try{
external.max_invoke("BackupLayout");
external.max_invoke("ChangeLayout",id);
if(!confirm($lang("keep_layout"))){
external.max_invoke("RestoreLayout");
window.event.returnValue=false;
}
}
catch(e){
alert(e.description);
}
};
maxConfigWizard.setAdhunter=function(_9){
maxConfig.ini.setValue("AdHunter","PopupBlocker","0");
maxConfig.ini.setValue("AdHunter","ContentBlocker","0");
maxConfig.ini.setValue("AdHunter","UseTextFilter","0");
if(_9>2){
maxConfig.ini.setValue("AdHunter","UseTextFilter","1");
}
if(_9>1){
maxConfig.ini.setValue("AdHunter","ContentBlocker","1");
}
if(_9>0){
maxConfig.ini.setValue("AdHunter","PopupBlocker","1");
}
maxConfig.save();
};